<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>分站数据</title>
		<meta name="viewport" content="width=device-width,height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="renderer" content="webkit" />
		<meta name="aplus-xplug" content="NONE">
		<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="/static/iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="/static/layui/css/modules/admin/default/admin.css" />
		<link rel="stylesheet" type="text/css" href="/static/css/new_layui.css" />
		<link rel="stylesheet" type="text/css" href="/static/css/default.css" />
		<script type="text/javascript" charset="utf-8" src="/static/layui/layui.js"></script>
		<script type="text/javascript" charset="utf-8" src="/static/js/index.js"></script>
		<style>
			form .layui-form-item .layui-form-label {
				width: auto;
				padding-left: 5px;
				padding-right: 5px;
			}
			
			.layui-input,
			.layui-textarea {
				width: 120px;
				height: 30px;
				line-height: 28px;
			}
			.layui-form-label{
				padding-top: 4px;
			}
			form .layui-form-item .layui-input-inline{
				width: 120px;
			}
			.label-title{
				color: #FF5722;
			}
			.layui-form-switch{
				margin-top: 4px;
			}
		</style>
	</head>

	<body class="default">
		<div style="margin: 30px 20px;">
			
			<form class="layui-form" lay-filter="tpl_site_data" action="{:url('goods/saveData')}">
				{volist name="data" id="list"}
				<fieldset class="layui-elem-field">
					<legend>{$list.site_info.site_name}</legend>
					{volist name="list['sale_price_info']['data']" id="vo"}
					<div class="layui-field-box">
					<div class="layui-form-item">
						<label class="layui-form-label label-title">{$vo.sale_attr_price_name}</label>
						<label class="layui-form-label">市场价</label>
						<div class="layui-input-inline">
							<input type="number" name="market_price" required lay-verify="required" value="{$vo.market_price}" data-old_value="{$vo.market_price}" data-site_id="{$list.site_id}" data-sign="{$vo.sale_price_sign}" data-goods_sku="{$vo.goods_sku}" autocomplete="off" class="layui-input">
						</div>
						<label class="layui-form-label">销售价</label>
						<div class="layui-input-inline">
							<input type="number" name="sale_price" required lay-verify="required" value="{$vo.sale_price}" data-old_value="{$vo.sale_price}" data-site_id="{$list.site_id}" data-sign="{$vo.sale_price_sign}" data-goods_sku="{$vo.goods_sku}" autocomplete="off" class="layui-input">
						</div>
						<label class="layui-form-label">接口价</label>
						<div class="layui-input-inline">
							<input type="number" name="api_price" required lay-verify="required" value="{$vo.api_price}" data-old_value="{$vo.api_price}" data-site_id="{$list.site_id}" data-sign="{$vo.sale_price_sign}" data-goods_sku="{$vo.goods_sku}" autocomplete="off" class="layui-input">
						</div>
						<label class="layui-form-label">库存</label>
						<div class="layui-input-inline">
							<input type="number" name="view_stock" required lay-verify="required" value="{$vo.view_stock}" data-old_value="{$vo.view_stock}" data-site_id="{$list.site_id}" data-sign="{$vo.sale_price_sign}" data-goods_sku="{$vo.goods_sku}" autocomplete="off" class="layui-input">
						</div>
						<label class="layui-form-label">销售状态</label>
						<div class="layui-input-inline">
							<input data-site_id="{$list.site_id}" data-goods_sku="{$vo.goods_sku}" type="checkbox" {if condition="$list['sale_state'] EQ 1"}checked{/if} lay-skin="switch" lay-filter="sale_state_on" lay-text="销售|下架"> 
						</div>
					</div>
					</div>
					{/volist}
				</fieldset>
				{/volist}
			</form>
		</div>

		<script>
			var saveSitePriceInfoUrl = "{:url('goods/saveSitePriceInfo')}";
		</script>

		<script src="/static/js/goods/site_data.js" type="text/javascript" charset="utf-8"></script>
	</body>

</html>